<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>审核量化表</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../lib/layui-v2.6.3/css/layui.css" media="all">
    <script src="../lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
    <script src="../js/jquery-3.1.1.min.js"></script>
    <style>
        #form {
            width: 80%;
            margin: 2.5% auto;
        }

        #table {
            width: 100%;
        }

        #table tr {
            width: 100%;
        }

        #table td {
            width: 200px;
            height: 30px;
            text-align: center;
        }

        .type:hover {
            color: #4D67F8;
            text-decoration: underline;
            cursor: pointer;
        }

        .material:hover {
            color: #4D67F8;
            text-decoration: underline;
            cursor: pointer;
        }

        .layui-input {
            width: 300px;
        }

        .layui-form-radio:hover *,
        .layui-form-radioed,
        .layui-form-radioed>i {
            color: #FCBF5B
        }

        #noForm {
            width: 50%;
            height: 500px;
            position: absolute;
            left: 24%;
            background-image: url(../images/noForm.png);
            background-size: 100% 100%
        }
    </style>
</head>

<body>
    <div id="noForm" style="display: none;">
    </div>
    <div id="haveForm">
        <div style="width: 100%;margin: 50px 32%;" id="searchbar">
            <input id="search_sno" type="text" name="sno" placeholder="学号" autocomplete="off" class="layui-input"
                style="display: inline-block;width: 200px;">
            <input id="search_sname" type="text" name="sname" placeholder="姓名" autocomplete="off" class="layui-input"
                style="display: inline-block;width: 200px;">
            <button id="searchBtn" class="layui-btn" style="background-color: #4D67F8;">搜索</button>
        </div>
        <div id="form">
            <div>
                <h2 style="text-align: center;margin:20px;font-weight:bold;">
                    <span id="college">信息学院</span>
                    <span id="year">2020-2021学年</span>
                    综合评分统计表(Q2)
                </h2>
                <div>
                    <span style="font-size:16px;font-weight:bold;margin-right: 150px;">班级：<span
                            id="class"></span></span>
                    <span style="font-size:16px;font-weight:bold;margin-right: 150px;">姓名：<span id="name"></span></span>
                    <span style="font-size:16px;font-weight:bold;margin-right: 150px;">学号：<span id="sno"></span></span>
                    <span style="font-size:16px;font-weight:bold;">量化总得分(Q2)：<span id="total"></span></span>
                </div>
                <div style="line-height: 22px;margin: 10px 0;">
                    <p>1.此表必须如实填写，如有虚假，后果自负，直至取消评优资格。</p>
                    <p>2.所有加分项目必须附有效证明材料，没有证明材料分数不统计。</p>
                    <p>3.所有加分项写准确名称、分数、证明材料编号，不写分数不予统计；每一类加分项可自加行或减行，不可改变表格结构。</p>
                    <p>注：量化考核分的计算方法为：Q2=T1+T2+T3+T4+T5+T6-T7。</p>
                    <p style="margin-left:30px;">
                        其中，Q2为量化累加总分，T1为社会职务加分，上限为25分；T2为德育加分，上限为30分；T3为智育(创新)加分，无上限；T4为体育加分，T5为美育加分，T4
                        与T5总和的上限为50分；T6为劳育加分，该项为附加分，上限为5分；T7为扣分内容。
                        Q2最高分值为100分，超出最高分值的按100分记。</p>
                </div>
            </div>
            <table cellspacing="0" border="2px" id="table">
                <tr>
                    <td rowspan="2">加分项</td>
                    <td colspan="3">第一学期</td>
                    <td colspan="3">第二学期</td>
                </tr>
                <tr>
                    <td>名称</td>
                    <td>分数</td>
                    <td>证明材料编号</td>
                    <td>名称</td>
                    <td>分数</td>
                    <td>证明材料编号</td>
                </tr>
                <tr class="SHZW_tr">
                    <td rowspan="4" class="type" id="SHZW">社会职务</td>
                    <td class="SHZW_name1"></td>
                    <td class="SHZW_score1"></td>
                    <td class="SHZW_material1"></td>
                    <td class="SHZW_name2"></td>
                    <td class="SHZW_score2"></td>
                    <td class="SHZW_material2"></td>
                </tr>
                <tr class="SHZW_tr">
                    <td class="SHZW_name1"></td>
                    <td class="SHZW_score1"></td>
                    <td class="SHZW_material1"></td>
                    <td class="SHZW_name2"></td>
                    <td class="SHZW_score2"></td>
                    <td class="SHZW_material2"></td>
                </tr>
                <tr class="SHZW_tr">
                    <td class="SHZW_name1"></td>
                    <td class="SHZW_score1"></td>
                    <td class="SHZW_material1"></td>
                    <td class="SHZW_name2"></td>
                    <td class="SHZW_score2"></td>
                    <td class="SHZW_material2"></td>
                <tr>
                    <td>分数小计：</td>
                    <td id="SHZW_total1"></td>
                    <td></td>
                    <td>分数小计：</td>
                    <td id="SHZW_total2"></td>
                    <td></td>
                </tr>
                <tr class="DY_tr">
                    <td rowspan="4" class="type" id="DY">德育</td>
                    <td class="DY_name1"></td>
                    <td class="DY_score1"></td>
                    <td class="DY_material1"></td>
                    <td class="DY_name2"></td>
                    <td class="DY_score2"></td>
                    <td class="DY_material2"></td>
                </tr>
                <tr class="DY_tr">
                    <td class="DY_name1"></td>
                    <td class="DY_score1"></td>
                    <td class="DY_material1"></td>
                    <td class="DY_name2"></td>
                    <td class="DY_score2"></td>
                    <td class="DY_material2"></td>
                </tr>
                <tr class="DY_tr">
                    <td class="DY_name1"></td>
                    <td class="DY_score1"></td>
                    <td class="DY_material1"></td>
                    <td class="DY_name2"></td>
                    <td class="DY_score2"></td>
                    <td class="DY_material2"></td>
                </tr>
                <tr>
                    <td>分数小计：</td>
                    <td id="DY_total1"></td>
                    <td></td>
                    <td>分数小计：</td>
                    <td id="DY_total2"></td>
                    <td></td>
                </tr>
                <tr class="MY_tr">
                    <td rowspan="4" class="type" id="ZY">智育</td>
                    <td class="ZY_name1"></td>
                    <td class="ZY_score1"></td>
                    <td class="ZY_material1"></td>
                    <td class="ZY_name2"></td>
                    <td class="ZY_score2"></td>
                    <td class="ZY_material2"></td>
                </tr>
                <tr class="MY_tr">
                    <td class="ZY_name1"></td>
                    <td class="ZY_score1"></td>
                    <td class="ZY_material1"></td>
                    <td class="ZY_name2"></td>
                    <td class="ZY_score2"></td>
                    <td class="ZY_material2"></td>
                </tr>
                <tr class="MY_tr">
                    <td class="ZY_name1"></td>
                    <td class="ZY_score1"></td>
                    <td class="ZY_material1"></td>
                    <td class="ZY_name2"></td>
                    <td class="ZY_score2"></td>
                    <td class="ZY_material2"></td>
                </tr>
                <tr>
                    <td>分数小计：</td>
                    <td id="ZY_total1"></td>
                    <td></td>
                    <td>分数小计：</td>
                    <td id="ZY_total2"></td>
                    <td></td>
                </tr>
                <tr class="TY_tr">
                    <td rowspan="4" class="type" id="TY">体育</td>
                    <td class="TY_name1"></td>
                    <td class="TY_score1"></td>
                    <td class="TY_material1"></td>
                    <td class="TY_name2"></td>
                    <td class="TY_score2"></td>
                    <td class="TY_material2"></td>
                </tr>
                <tr class="TY_tr">
                    <td class="TY_name1"></td>
                    <td class="TY_score1"></td>
                    <td class="TY_material1"></td>
                    <td class="TY_name2"></td>
                    <td class="TY_score2"></td>
                    <td class="TY_material2"></td>
                </tr>
                <tr class="TY_tr">
                    <td class="TY_name1"></td>
                    <td class="TY_score1"></td>
                    <td class="TY_material1"></td>
                    <td class="TY_name2"></td>
                    <td class="TY_score2"></td>
                    <td class="TY_material2"></td>
                </tr>
                <tr>
                    <td>分数小计：</td>
                    <td id="TY_total1"></td>
                    <td></td>
                    <td>分数小计：</td>
                    <td id="TY_total2"></td>
                    <td></td>
                </tr>
                <tr class="MY_tr">
                    <td rowspan="4" class="type" id="MY">美育</td>
                    <td class="MY_name1"></td>
                    <td class="MY_score1"></td>
                    <td class="MY_material1"></td>
                    <td class="MY_name2"></td>
                    <td class="MY_score2"></td>
                    <td class="MY_material2"></td>
                </tr>
                <tr class="MY_tr">
                    <td class="MY_name1"></td>
                    <td class="MY_score1"></td>
                    <td class="MY_material1"></td>
                    <td class="MY_name2"></td>
                    <td class="MY_score2"></td>
                    <td class="MY_material2"></td>
                </tr>
                <tr class="MY_tr">
                    <td class="MY_name1"></td>
                    <td class="MY_score1"></td>
                    <td class="MY_material1"></td>
                    <td class="MY_name2"></td>
                    <td class="MY_score2"></td>
                    <td class="MY_material2"></td>
                </tr>
                <tr>
                    <td>分数小计：</td>
                    <td id="MY_total1"></td>
                    <td></td>
                    <td>分数小计：</td>
                    <td id="MY_total2"></td>
                    <td></td>
                </tr>
                <tr class="LY_tr">
                    <td rowspan="4" class="type" id="LY">劳育</td>
                    <td class="LY_name1"></td>
                    <td class="LY_score1"></td>
                    <td class="LY_material1"></td>
                    <td class="LY_name2"></td>
                    <td class="LY_score2"></td>
                    <td class="LY_material2"></td>
                </tr>
                <tr class="LY_tr">
                    <td class="LY_name1"></td>
                    <td class="LY_score1"></td>
                    <td class="LY_material1"></td>
                    <td class="LY_name2"></td>
                    <td class="LY_score2"></td>
                    <td class="LY_material2"></td>
                </tr>
                <tr class="LY_tr">
                    <td class="LY_name1"></td>
                    <td class="LY_score1"></td>
                    <td class="LY_material1"></td>
                    <td class="LY_name2"></td>
                    <td class="LY_score2"></td>
                    <td class="LY_material2"></td>
                </tr>
                <tr>
                    <td>分数小计：</td>
                    <td id="LY_total1"></td>
                    <td></td>
                    <td>分数小计：</td>
                    <td id="LY_total2"></td>
                    <td></td>
                </tr>
                <tr class="KF_tr">
                    <td rowspan="4" class="type" id="KF">扣分项目</td>
                    <td class="KF_name1"></td>
                    <td class="KF_score1"></td>
                    <td class="KF_material1"></td>
                    <td class="KF_name2"></td>
                    <td class="KF_score2"></td>
                    <td class="KF_material2"></td>
                </tr>
                <tr class="KF_tr">
                    <td class="KF_name1"></td>
                    <td class="KF_score1"></td>
                    <td class="KF_material1"></td>
                    <td class="KF_name2"></td>
                    <td class="KF_score2"></td>
                    <td class="KF_material2"></td>
                </tr>
                <tr class="KF_tr">
                    <td class="KF_name1"></td>
                    <td class="KF_score1"></td>
                    <td class="KF_material1"></td>
                    <td class="KF_name2"></td>
                    <td class="KF_score2"></td>
                    <td class="KF_material2"></td>
                </tr>
                <tr>
                    <td>分数小计：</td>
                    <td id="KF_total1"></td>
                    <td></td>
                    <td>分数小计：</td>
                    <td id="KF_total2"></td>
                    <td></td>
                </tr>
                <tr style="height: 80px;">
                    <td>本人签字：</td>
                    <td colspan="3" id="self_writing"></td>
                    <td>班主任签字：</td>
                    <td colspan="3" id="teacher_writing"></td>
                </tr>
            </table>
        </div>
        <div id="fun" style="width:720px;margin: 50px auto;">
            <button type="button" class="layui-btn fanye" style="margin: 20px;background-color: #4D67F8            ;"
                id="pre">上一页</button>
            <button type="button" class="layui-btn" style="margin: 20px;background-color: #FB9101;"
                id="print">打印量化表</button>
            <button type="button" class="layui-btn" style="margin: 20px;background-color: #FB9101;"
                id="no_pass">审核不通过</button>
            <button type="button" class="layui-btn" style="margin: 20px;background-color: #FB9101;"
                id="pass">审核通过</button>
            <button type="button" class="layui-btn fanye" style="margin: 20px;background-color: #4D67F8;"
                id="next">下一页</button>
        </div>
    </div>
    <script src="../js/lay-config.js?v=2.0.0" charset="utf-8"></script>
    <script src="../js/test_login.js"></script>
    <script>
        window.onresize = function () {
            if (window.outerWidth == 836)
                document.getElementById("searchbar").style.margin = "50px 20%";
            else {
                document.getElementById("searchbar").style.margin = "50px 32%";
            }
        }
        layui.use(['jquery', 'layer', 'form', 'upload'], function () {
            var $ = layui.jquery,
                layer = layui.layer,
                form = layui.form,
                upload = layui.upload;
            var username = localStorage.getItem("name");
            var url = '';
            var SHZW_Data1 = [],
                SHZW_Data2 = [];
            var DY_Data1 = [],
                DY_Data2 = [];
            var MY_Data1 = [],
                MY_Data2 = [];
            var ZY_Data1 = [],
                ZY_Data2 = [];
            var TY_Data1 = [],
                TY_Data2 = [];
            var LY_Data1 = [],
                LY_Data2 = [];
            var KF_Data1 = [],
                KF_Data2 = [];
            var SHZW_num1 = 0,
                SHZW_num2 = 0;
            var DY_num1 = 0,
                DY_num2 = 0;
            var MY_num1 = 0,
                MY_num2 = 0;
            var ZY_num1 = 0,
                ZY_num2 = 0;
            var TY_num1 = 0,
                TY_num2 = 0;
            var LY_num1 = 0,
                LY_num2 = 0;
            var KF_num1 = 0,
                KF_num2 = 0;
            var SHZW_total1 = 0,
                SHZW_total2 = 0;
            var DY_total1 = 0,
                DY_total2 = 0;
            var ZY_total1 = 0,
                ZY_total2 = 0;
            var TY_total1 = 0,
                TY_total2 = 0;
            var MY_total1 = 0,
                MY_total2 = 0;
            var LY_total1 = 0,
                LY_total2 = 0;
            var KF_total1 = 0,
                KF_total2 = 0;
            var SHZW_more_num1 = 0,
                SHZW_more_num2 = 0;
            var DY_more_num1 = 0,
                DY_more_num2 = 0;
            var ZY_more_num1 = 0,
                ZY_more_num2 = 0;
            var TY_more_num1 = 0,
                TY_more_num2 = 0;
            var MY_more_num1 = 0,
                MY_more_num2 = 0;
            var LY_more_num1 = 0,
                LY_more_num2 = 0;
            var KF_more_num1 = 0,
                KF_more_num2 = 0;
            var addnum = 0;
            var index = "";
            var item_type = "";
            var item_num1 = 0;
            var item_num2 = 0;
            var item_total1 = 0;
            var item_total2 = 0;
            var status = 0; //标记量化表状态
            localStorage.setItem("status", status);

            $(document).on('click', '.material', function () {
                var linkIndex = $('.material').index(this);
                var link = $('.link').eq(linkIndex).text();
                layer.open({
                    title: "查看证明材料",
                    area: ['640px', '440px'],
                    type: 1,
                    content: '<img src="' + link +
                        '" style="width:600px;margin:10px 5px 10px 20px"></img>'
                })
            });

            //打印量化表
            $('#print').on("click", function () {
                var newstr = $("#form").html();
                var re = new RegExp("margin-right: 150px;", "g");
                newstr = newstr.replace(re, "margin-right: 60px;");
                var oldstr = $('body').html();
                $('body').html(newstr);
                window.print();
                $('body').html(oldstr);
            });
            //审核通过
            $('#pass').on("click", function () {
                var name = localStorage.getItem("name");
                var sno = localStorage.getItem("sno");
                if (localStorage.getItem(sno + "_status") == 3 || localStorage.getItem(sno +
                        "_status") == -2) {
                    var index = layer.alert("您是否确认通过审核？", {
                        title: '审核提醒'
                    }, function () {
                        $.get('/form', {
                            status: 10,
                            sno: sno,
                            mode: 2 //辅导员通过审核
                        }, function (re) {
                            if (re != '0') {
                                data1 = {};
                                data1.status = 5;
                                data1.mode = 2;
                                data1.sno = sno;
                                data1.content = "团委老师" + name + "通过审核";
                                if (re == '1') {
                                    $.get('/form', data1, function (re) {
                                        if (re == '1') {
                                            localStorage.setItem(sno +
                                                "_status", 4);
                                            layer.msg('审核成功！');
                                        } else {
                                            layer.msg('审核失败！');
                                        }
                                    })
                                } else {
                                    layer.msg('审核失败！');
                                }
                            } else {
                                layer.msg('审核失败！');
                            }
                        })
                        layer.close(index);
                    });
                } else if (localStorage.getItem(sno + "_status") == 4) {
                    layer.msg("请勿重复审核！");
                }
            });
            $('#no_pass').on("click", function () {
                var name = localStorage.getItem("name");
                var sno = localStorage.getItem("sno");
                if (localStorage.getItem(sno + "_status") == 3 || localStorage.getItem(sno +
                        "_status") == 4) {
                    layer.prompt({
                        formType: 2,
                        value: '审核不通过的原因：',
                        title: '审核反馈',
                    }, function (value, index, elem) {
                        $.get('/form', {
                            status: 10,
                            sno: sno,
                            mode: -2 //辅导员不通过审核
                        }, function (re) {
                            if (re != '0') {
                                data1 = {};
                                data1.status = 5;
                                data1.mode = 2;
                                data1.sno = sno;
                                data1.content = "班主任" + name + "没有通过审核\n" + value;
                                if (re == '1') {
                                    $.get('/form', data1, function (re) {
                                        if (re == '1') {
                                            localStorage.setItem(sno +
                                                "_status", -2);
                                            layer.msg('审核反馈成功！');
                                        } else {
                                            layer.msg('审核反馈失败！');
                                        }
                                    })
                                } else {
                                    layer.msg('审核反馈失败！');
                                }
                            } else {
                                layer.msg('审核反馈失败！');
                            }
                        })
                        layer.close(index);
                    });
                } else if (localStorage.getItem(sno + "_status") == -2) {
                    layer.msg("请勿重复审核！");
                }
            });
            $('#searchBtn').on('click', function () {
                var mode = 0;
                var search_sno = $('#search_sno').val();
                var search_sname = $('#search_sname').val();
                if (search_sno == "" && search_sname == "")
                    layer.msg("请输入筛选项！");
                else if (search_sno != "" && search_sname == "")
                    mode = 1; //按照学号搜索
                else if (search_sno == "" && search_sname != "")
                    mode = 2; //按照姓名搜索
                else
                    mode = 3; //按照学号和姓名搜索
                $.get('/form', {
                    status: 9, //量化表搜索
                    mode: mode,
                    mode2: "commitee",
                    sno: search_sno,
                    sname: search_sname
                }, function (re) {
                    if (re != '0') {
                        var status = parseInt(re.data[0].status);
                        var year = new Date().getFullYear();
                        var oldyear = parseInt(year) - 1;
                        var SHZW_Data1 = [],
                            SHZW_Data2 = [];
                        var DY_Data1 = [],
                            DY_Data2 = [];
                        var MY_Data1 = [],
                            MY_Data2 = [];
                        var ZY_Data1 = [],
                            ZY_Data2 = [];
                        var TY_Data1 = [],
                            TY_Data2 = [];
                        var LY_Data1 = [],
                            LY_Data2 = [];
                        var KF_Data1 = [],
                            KF_Data2 = [];
                        var SHZW_num1 = 0,
                            SHZW_num2 = 0;
                        var DY_num1 = 0,
                            DY_num2 = 0;
                        var MY_num1 = 0,
                            MY_num2 = 0;
                        var ZY_num1 = 0,
                            ZY_num2 = 0;
                        var TY_num1 = 0,
                            TY_num2 = 0;
                        var LY_num1 = 0,
                            LY_num2 = 0;
                        var KF_num1 = 0,
                            KF_num2 = 0;
                        var SHZW_total1 = 0,
                            SHZW_total2 = 0;
                        var DY_total1 = 0,
                            DY_total2 = 0;
                        var ZY_total1 = 0,
                            ZY_total2 = 0;
                        var TY_total1 = 0,
                            TY_total2 = 0;
                        var MY_total1 = 0,
                            MY_total2 = 0;
                        var LY_total1 = 0,
                            LY_total2 = 0;
                        var KF_total1 = 0,
                            KF_total2 = 0;
                        var SHZW_more_num1 = 0,
                            SHZW_more_num2 = 0;
                        var DY_more_num1 = 0,
                            DY_more_num2 = 0;
                        var ZY_more_num1 = 0,
                            ZY_more_num2 = 0;
                        var TY_more_num1 = 0,
                            TY_more_num2 = 0;
                        var MY_more_num1 = 0,
                            MY_more_num2 = 0;
                        var LY_more_num1 = 0,
                            LY_more_num2 = 0;
                        var KF_more_num1 = 0,
                            KF_more_num2 = 0;
                        var addnum = 0;
                        var index = "";
                        var item_type = "";
                        var item_num1 = 0;
                        var item_num2 = 0;
                        var item_total1 = 0;
                        var item_total2 = 0;
                        $('#college').text(re.data[0].college_name);
                        $('#year').text('' + oldyear + '-' + year + '学年');
                        $('#class').text(re.data[0].class);
                        $('#name').text(re.data[0].s_name);
                        $('#sno').text(re.data[0].s_id);
                        localStorage.setItem("sno", re.data[0].s_id);
                        var html = localStorage.getItem("html");
                        $('#table').html(html);
                        $('#self_writing').html(re.data[0].s_name);
                        var teacher = localStorage.getItem("teacher");
                        $('#teacher_writing').html(teacher);
                        for (var i = 0; i < re.data.length; i++) {
                            if (re.data[i].type == '社会职务') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    SHZW_Data1[SHZW_num1] = dataItem;
                                    SHZW_num1++;
                                } else if (re.data[i].term == '2') {
                                    SHZW_Data2[SHZW_num2] = dataItem;
                                    SHZW_num2++;
                                }
                            } else if (re.data[i].type == '德育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    DY_Data1[DY_num1] = dataItem;
                                    DY_num1++;
                                } else if (re.data[i].term == '2') {
                                    DY_Data2[DY_num2] = dataItem;
                                    DY_num2++;
                                }
                            } else if (re.data[i].type == '美育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    MY_Data1[MY_num1] = dataItem;
                                    MY_num1++;
                                } else if (re.data[i].term == '2') {
                                    MY_Data2[MY_num2] = dataItem;
                                    MY_num2++;
                                }
                            } else if (re.data[i].type == '智育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    ZY_Data1[ZY_num1] = dataItem;
                                    ZY_num1++;
                                } else if (re.data[i].term == '2') {
                                    ZY_Data2[ZY_num2] = dataItem;
                                    ZY_num2++;
                                }
                            } else if (re.data[i].type == '体育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    TY_Data1[TY_num1] = dataItem;
                                    TY_num1++;
                                } else if (re.data[i].term == '2') {
                                    TY_Data2[TY_num2] = dataItem;
                                    TY_num2++;
                                }
                            } else if (re.data[i].type == '劳育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    LY_Data1[LY_num1] = dataItem;
                                    LY_num1++;
                                } else if (re.data[i].term == '2') {
                                    LY_Data2[LY_num2] = dataItem;
                                    LY_num2++;
                                }
                            } else if (re.data[i].type == '扣分项目') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    KF_Data1[KF_num1] = dataItem;
                                    KF_num1++;
                                } else if (re.data[i].term == '2') {
                                    KF_Data2[KF_num2] = dataItem;
                                    KF_num2++;
                                }
                            }
                        }
                        //加载社会职务
                        SHZW_html = '';
                        for (var i = 0; i < SHZW_num1; i++) {
                            if (i < 3) {
                                $('.SHZW_name1').eq(i).html(
                                    SHZW_Data1[i].item_name);
                                $('.SHZW_score1').eq(i).html(
                                    SHZW_Data1[i].score);
                                $('.SHZW_material1').eq(i).html(
                                    '<a class="material" >' +
                                    SHZW_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    SHZW_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                SHZW_more_num1++;
                                SHZW_html += '<tr><td class = "SHZW_name1" >' +
                                    SHZW_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = "SHZW_score1" > ' +
                                    SHZW_Data1[
                                        i].score +
                                    '</td> <td class = "SHZW_material1" ><a class="material" >' +
                                    SHZW_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    SHZW_Data1[i].proof +
                                    '</span></a> </td><td class = "SHZW_name2" > </td> <td class = "SHZW_score2" > </td> <td class = "SHZW_material2" > </td> </tr>';
                            }
                            SHZW_total1 += SHZW_Data1[i].score;
                        }
                        for (var i = 0; i < SHZW_num2; i++) {
                            if (i < 3) {
                                $('.SHZW_name2').eq(i).html(
                                    SHZW_Data2[i].item_name);
                                $('.SHZW_score2').eq(i).html(
                                    SHZW_Data2[i].score);
                                $('.SHZW_material2').eq(i).html(
                                    '<a class="material" >' +
                                    SHZW_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    SHZW_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                SHZW_more_num2++;
                                SHZW_html +=
                                    '<tr><td class = "SHZW_name1" ></td> <td class = "SHZW_score1" ></td> <td class = "SHZW_material1" > </td><td class = "SHZW_name2" > ' +
                                    SHZW_Data2[i]
                                    .item_name +
                                    '</td> <td class = "SHZW_score2" > ' +
                                    SHZW_Data2[i].score +
                                    '</td> <td class = "SHZW_material2" ><a class="material" >' +
                                    SHZW_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    SHZW_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            SHZW_total2 += SHZW_Data2[i].score;
                        }
                        if (SHZW_html != '') {
                            var SHZW_more_num = SHZW_more_num1 > SHZW_more_num2 ?
                                SHZW_more_num1 : SHZW_more_num2;
                            $('#SHZW').attr('rowspan', 4 + SHZW_more_num);
                            $(".SHZW_tr").eq(-1).after(SHZW_html);
                        }
                        $('#SHZW_total1').html(SHZW_total1);
                        $('#SHZW_total2').html(SHZW_total2);
                        //加载德育活动
                        DY_html = '';
                        for (var i = 0; i < DY_num1; i++) {
                            if (i < 3) {
                                $('.DY_name1').eq(i).html(
                                    DY_Data1[i].item_name);
                                $('.DY_score1').eq(i).html(
                                    DY_Data1[i].score);
                                $('.DY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    DY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    DY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                DY_more_num1++;
                                DY_html += '<tr><td class = "DY_name1" >' +
                                    DY_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = "DY_score1" > ' +
                                    DY_Data1[
                                        i].score +
                                    '</td> <td class = "DY_material1" ><a class="material" >' +
                                    DY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    DY_Data1[i].proof +
                                    '</span></a> </td><td class = "DY_name2" > </td> <td class = "DY_score2" > </td> <td class = "DY_material2" > </td> </tr>';
                            }
                            DY_total1 += DY_Data1[i].score;
                        }
                        for (var i = 0; i < DY_num2; i++) {
                            if (i < 3) {
                                $('.DY_name2').eq(i).html(
                                    DY_Data2[i].item_name);
                                $('.DY_score2').eq(i).html(
                                    DY_Data2[i].score);
                                $('.DY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    DY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    DY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                DY_more_num2++;
                                DY_html +=
                                    '<tr><td class = "DY_name1" ></td> <td class = "DY_score1" ></td> <td class = "DY_material1" > </td><td class = "DY_name2" > ' +
                                    DY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "DY_score2" > ' +
                                    DY_Data2[i].score +
                                    '</td> <td class = "DY_material2" ><a class="material" >' +
                                    DY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    DY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            DY_total2 += DY_Data2[i].score;
                        }
                        if (DY_html != '') {
                            var DY_more_num = DY_more_num1 > DY_more_num2 ?
                                DY_more_num1 : DY_more_num2;
                            $('#DY').attr('rowspan', 4 + DY_more_num);
                            $(".DY_tr").eq(-1).after(DY_html);
                        }
                        $('#DY_total1').html(DY_total1);
                        $('#DY_total2').html(DY_total2);

                        //加载智育活动
                        ZY_html = '';
                        for (var i = 0; i < ZY_num1; i++) {
                            if (i < 3) {
                                $('.ZY_name1').eq(i).text(
                                    ZY_Data1[i].item_name);
                                $('.ZY_score1').eq(i).text(
                                    ZY_Data1[i].score);
                                $('.ZY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    ZY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    ZY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                ZY_more_num1++;
                                ZY_html += '<tr><td class = "ZY_name1" >' +
                                    ZY_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = "ZY_score1" > ' +
                                    ZY_Data1[
                                        i].score +
                                    '</td> <td class = "ZY_material1" > <a class="material" >' +
                                    ZY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    ZY_Data1[i].proof +
                                    '</span></a> </td><td class = "ZY_name2" > </td> <td class = "ZY_score2" > </td> <td class = "ZY_material2" > </td> </tr>';
                            }
                            ZY_total1 += ZY_Data1[i].score;
                        }
                        for (var i = 0; i < ZY_num2; i++) {
                            if (i < 3) {
                                $('.ZY_name2').eq(i).text(
                                    ZY_Data2[i].item_name);
                                $('.ZY_score2').eq(i).text(
                                    ZY_Data2[i].score);
                                $('.ZY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    ZY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    ZY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                ZY_more_num2++;
                                ZY_html +=
                                    '<tr><td class = "ZY_name1" >< /td> <td class = "ZY_score1" ></td> <td class = "ZY_material1" > </td><td class = "ZY_name2" > ' +
                                    ZY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "ZY_score2" > ' +
                                    ZY_Data2[i].score +
                                    '</td> <td class = "ZY_material2" > <a class="material" >' +
                                    ZY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    ZY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            ZY_total2 += ZY_Data2[i].score;
                        }
                        if (ZY_html != '') {
                            var ZY_more_num = ZY_more_num1 > ZY_more_num2 ?
                                ZY_more_num1 : ZY_more_num2;
                            $('#ZY').attr('rowspan', 4 + ZY_more_num);
                            $(".ZY_tr").eq(-1).after(ZY_html);
                        }
                        $('#ZY_total1').html(ZY_total1);
                        $('#ZY_total2').html(ZY_total2);

                        //加载体育活动
                        TY_html = '';
                        for (var i = 0; i < TY_num1; i++) {
                            if (i < 3) {
                                $('.TY_name1').eq(i).text(
                                    TY_Data1[i].item_name);
                                $('.TY_score1').eq(i).text(
                                    TY_Data1[i].score);
                                $('.TY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    TY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    TY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                TY_more_num1++;
                                TY_html +=
                                    '<tr class="TY_tr"><td class = "TY_name1" >' +
                                    TY_Data1[
                                        i]
                                    .item_name +
                                    '</td> <td class = "TY_score1" > ' +
                                    TY_Data1[
                                        i].score +
                                    '</td> <td class = "TY_material1" > <a class="material" >' +
                                    TY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    TY_Data1[i].proof +
                                    '</span></a></td><td class = "TY_name2" > </td> <td class = "TY_score2" > </td> <td class = "TY_material2" > </td> </tr>';
                            }
                            TY_total1 += TY_Data1[i].score;
                        }
                        for (var i = 0; i < TY_num2; i++) {
                            if (i < 3) {
                                $('.TY_name2').eq(i).text(
                                    TY_Data2[i].item_name);
                                $('.TY_score2').eq(i).text(
                                    TY_Data2[i].score);
                                $('.TY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    TY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    TY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                TY_more_num2++;
                                TY_html +=
                                    '<tr class="TY_tr"><td class = "TY_name1"></td> <td class = "TY_score1" ></td> <td class = "TY_material1" > </td><td class = "TY_name2" > ' +
                                    TY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "TY_score2" > ' +
                                    TY_Data2[i].score +
                                    '</td> <td class = "TY_material2" ><a class="material" >' +
                                    TY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    TY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            TY_total2 += TY_Data2[i].score;
                        }
                        if (TY_html != '') {
                            var TY_more_num = TY_more_num1 > TY_more_num2 ?
                                TY_more_num1 : TY_more_num2;
                            $('#TY').attr('rowspan', 4 + TY_more_num);
                            $(".TY_tr").eq(-1).after(TY_html);
                        }
                        $('#TY_total1').html(TY_total1);
                        $('#TY_total2').html(TY_total2);

                        //加载美育活动
                        MY_html = '';
                        for (var i = 0; i < MY_num1; i++) {
                            if (i < 3) {
                                $('.MY_name1').eq(i).text(
                                    MY_Data1[i].item_name);
                                $('.MY_score1').eq(i).text(
                                    MY_Data1[i].score);
                                $('.MY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    MY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    MY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                MY_more_num1++;
                                MY_html +=
                                    '<tr class="MY_tr"><td class = ".MY_name1" >' +
                                    MY_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = ".MY_score1" > ' +
                                    MY_Data1[
                                        i].score +
                                    '</td> <td class = "MY_material1" ><a class="material" >' +
                                    MY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    MY_Data1[i].proof +
                                    '</span></a></td><td class = "MY_name2" ></td> <td class = "MY_score2" > </td> <td class = "MY_material2" > </td> </tr>';
                            }
                            MY_total1 += MY_Data1[i].score;
                        }
                        for (var i = 0; i < MY_num2; i++) {
                            if (i < 3) {
                                $('.MY_name2').eq(i).text(
                                    MY_Data2[i].item_name);
                                $('.MY_score2').eq(i).text(
                                    MY_Data2[i].score);
                                $('.MY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    MY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    MY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                MY_more_num2++;
                                MY_html +=
                                    '<tr class="MY_tr"><td class = "MY_name1"></td><td class = "MY_score1" ></td> <td class = "MY_material1" ></td><td class = "MY_name2" > ' +
                                    MY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "MY_score2" > ' +
                                    MY_Data2[i].score +
                                    '</td> <td class = "MY_material2" ><a class="material" >' +
                                    MY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    MY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            MY_total2 += MY_Data2[i].score;
                        }
                        if (MY_html != '') {
                            var MY_more_num = MY_more_num1 > MY_more_num2 ?
                                MY_more_num1 : MY_more_num2;
                            $('#MY').attr('rowspan', 4 + MY_more_num);
                            $(".MY_tr").eq(-1).after(MY_html);
                        }
                        $('#MY_total1').html(MY_total1);
                        $('#MY_total2').html(MY_total2);

                        //加载劳育活动
                        LY_html = '';
                        for (var i = 0; i < LY_num1; i++) {
                            if (i < 3) {
                                $('.LY_name1').eq(i).text(
                                    LY_Data1[i].item_name);
                                $('.LY_score1').eq(i).text(
                                    LY_Data1[i].score);
                                $('.LY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    LY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    LY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                LY_more_num1++;
                                LY_html +=
                                    '<tr class="LY_tr"><td class = ".LY_name1" >' +
                                    LY_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = ".LY_score1" > ' +
                                    LY_Data1[
                                        i].score +
                                    '</td> <td class = "LY_material1" ><a class="material" >' +
                                    LY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    LY_Data1[i].proof +
                                    '</span></a></td><td class = "LY_name2" ></td> <td class = "LY_score2" > </td> <td class = "LY_material2" > </td> </tr>';
                            }
                            KY_total1 += LY_Data1[i].score;
                        }
                        for (var i = 0; i < LY_num2; i++) {
                            if (i < 3) {
                                $('.LY_name2').eq(i).text(
                                    LY_Data2[i].item_name);
                                $('.LY_score2').eq(i).text(
                                    LY_Data2[i].score);
                                $('.LY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    LY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    LY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                LY_more_num2++;
                                LY_html +=
                                    '<tr class="LY_tr"><td class = "LY_name1"></td><td class = "LY_score1" ></td> <td class = "LY_material1" ></td><td class = "LY_name2" > ' +
                                    LY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "LY_score2" > ' +
                                    LY_Data2[i].score +
                                    '</td> <td class = "LY_material2" ><a class="material" >' +
                                    LY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    LY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            LY_total2 += LY_Data2[i].score;
                        }
                        if (LY_html != '') {
                            var LY_more_num = LY_more_num1 > LY_more_num2 ?
                                LY_more_num1 : LY_more_num2;
                            $('#LY').attr('rowspan', 4 + LY_more_num);
                            $(".LY_tr").eq(-1).after(LY_html);
                        }
                        $('#LY_total1').html(LY_total1);
                        $('#LY_total2').html(LY_total2);

                        //加载扣分项目
                        KF_html = '';
                        for (var i = 0; i < KF_num1; i++) {
                            if (i < 3) {
                                $('.KF_name1').eq(i).text(
                                    KF_Data1[i].item_name);
                                $('.KF_score1').eq(i).text(
                                    KF_Data1[i].score);
                                $('.KF_material1').eq(i).html(
                                    '<a class="material" >' +
                                    KF_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    KF_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                KF_more_num1++;
                                KF_html +=
                                    '<tr class="KF_tr"><td class = ".KF_name1" >' +
                                    KF_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = ".KF_score1" > ' +
                                    KF_Data1[
                                        i].score +
                                    '</td> <td class = "KF_material1" ><a class="material" >' +
                                    KF_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    KF_Data1[i].proof +
                                    '</span></a></td><td class = "KF_name2" ></td> <td class = "KF_score2" > </td> <td class = "KF_material2" > </td> </tr>';
                            }
                            KF_total1 += KF_Data1[i].score;
                        }
                        for (var i = 0; i < KF_num2; i++) {
                            if (i < 3) {
                                $('.KF_name2').eq(i).text(
                                    KF_Data2[i].item_name);
                                $('.KF_score2').eq(i).text(
                                    KF_Data2[i].score);
                                $('.KF_material2').eq(i).html(
                                    '<a class="material" >' +
                                    KF_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    KF_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                KF_more_num2++;
                                KF_html +=
                                    '<tr class="KF_tr"><td class = "KF_name1"></td><td class = "KF_score1" ></td> <td class = "MY_material1" ></td><td class = "MY_name2" > ' +
                                    KF_Data2[i]
                                    .item_name +
                                    '</td> <td class = "KF_score2" > ' +
                                    KF_Data2[i].score +
                                    '</td> <td class = "KF_material2" ><a class="material" >' +
                                    KF_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    KF_Data2[i].proof +
                                    '</span></a> </td> </tr>';
                            }
                            KF_total2 += KF_Data2[i].score;
                        }
                        if (KF_html != '') {
                            var KF_more_num = KF_more_num1 > KF_more_num2 ?
                                KF_more_num1 : KF_more_num2;
                            $('#KF').attr('rowspan', 4 + KF_more_num);
                            $(".KF_tr").eq(-1).after(KF_html);
                        }
                        $('#KF_total1').html(KF_total1);
                        $('#KF_total2').html(KF_total2);

                        localStorage.setItem("SHZW_Data1", JSON.stringify(
                            SHZW_Data1));
                        localStorage.setItem("SHZW_Data2", JSON.stringify(
                            SHZW_Data2));
                        localStorage.setItem("DY_Data1", JSON.stringify(
                            DY_Data1));
                        localStorage.setItem("DY_Data2", JSON.stringify(
                            DY_Data2));
                        localStorage.setItem("ZY_Data1", JSON.stringify(
                            ZY_Data1));
                        localStorage.setItem("ZY_Data2", JSON.stringify(
                            ZY_Data2));
                        localStorage.setItem("TY_Data1", JSON.stringify(
                            TY_Data1));
                        localStorage.setItem("TY_Data2", JSON.stringify(
                            TY_Data2));
                        localStorage.setItem("MY_Data1", JSON.stringify(
                            MY_Data1));
                        localStorage.setItem("MY_Data2", JSON.stringify(
                            MY_Data2));
                        localStorage.setItem("LY_Data1", JSON.stringify(
                            LY_Data1));
                        localStorage.setItem("LY_Data2", JSON.stringify(
                            LY_Data2));
                        localStorage.setItem("KF_Data1", JSON.stringify(
                            KF_Data1));
                        localStorage.setItem("KF_Data2", JSON.stringify(
                            KF_Data2));
                        var T1 = SHZW_total1 +
                            SHZW_total2; //T1为社会职务加分，上限为25分
                        if (T1 >= 25)
                            T1 = 25;
                        var T2 = DY_total1 + DY_total2; //T2为德育加分，上限为30分
                        if (T2 >= 30)
                            T2 = 30;
                        var T3 = ZY_total1 + ZY_total2; //T3为智育(创新)加分，无上限
                        var T4_T5 = TY_total1 + TY_total2 + MY_total1 +
                            MY_total2; //T4为体育加分，T5为美育加分，T4 与T5总和的上限为50分
                        if (T4_T5 >= 50)
                            T4_T5 = 50;
                        var T6 = LY_total1 +
                            LY_total2; //T6为劳育加分，该项为附加分，上限为5分
                        if (T6 >= 5)
                            T6 = 5;
                        var T7 = Math.abs(KF_total1) + Math.abs(
                            KF_total2); //T7为扣分内容
                        var total = T1 + T2 + T3 + T4_T5 + T6 - T7;
                        if (total >= 100)
                            total = 100; //量化上限100
                        $('#total').html(total);
                        layer.msg("搜索成功！");
                    } else {
                        layer.msg("暂无结果！");
                    }
                });
            });
            //翻页
            $(".fanye").on("click", function () {
                var mode = "";
                if ($('.fanye').index(this) == 0)
                    mode = "pre";
                else
                    mode = "next";
                var sno = localStorage.getItem("sno");
                $.get('/form', {
                    status: 8, //量化表翻页
                    mode: mode,
                    mode2: "commitee",
                    sno: sno
                }, function (re) {
                    if (re != '0') {
                        var status = parseInt(re.data[0].status);
                        var year = new Date().getFullYear();
                        var oldyear = parseInt(year) - 1;
                        var SHZW_Data1 = [],
                            SHZW_Data2 = [];
                        var DY_Data1 = [],
                            DY_Data2 = [];
                        var MY_Data1 = [],
                            MY_Data2 = [];
                        var ZY_Data1 = [],
                            ZY_Data2 = [];
                        var TY_Data1 = [],
                            TY_Data2 = [];
                        var LY_Data1 = [],
                            LY_Data2 = [];
                        var KF_Data1 = [],
                            KF_Data2 = [];
                        var SHZW_num1 = 0,
                            SHZW_num2 = 0;
                        var DY_num1 = 0,
                            DY_num2 = 0;
                        var MY_num1 = 0,
                            MY_num2 = 0;
                        var ZY_num1 = 0,
                            ZY_num2 = 0;
                        var TY_num1 = 0,
                            TY_num2 = 0;
                        var LY_num1 = 0,
                            LY_num2 = 0;
                        var KF_num1 = 0,
                            KF_num2 = 0;
                        var SHZW_total1 = 0,
                            SHZW_total2 = 0;
                        var DY_total1 = 0,
                            DY_total2 = 0;
                        var ZY_total1 = 0,
                            ZY_total2 = 0;
                        var TY_total1 = 0,
                            TY_total2 = 0;
                        var MY_total1 = 0,
                            MY_total2 = 0;
                        var LY_total1 = 0,
                            LY_total2 = 0;
                        var KF_total1 = 0,
                            KF_total2 = 0;
                        var SHZW_more_num1 = 0,
                            SHZW_more_num2 = 0;
                        var DY_more_num1 = 0,
                            DY_more_num2 = 0;
                        var ZY_more_num1 = 0,
                            ZY_more_num2 = 0;
                        var TY_more_num1 = 0,
                            TY_more_num2 = 0;
                        var MY_more_num1 = 0,
                            MY_more_num2 = 0;
                        var LY_more_num1 = 0,
                            LY_more_num2 = 0;
                        var KF_more_num1 = 0,
                            KF_more_num2 = 0;
                        var addnum = 0;
                        var index = "";
                        var item_type = "";
                        var item_num1 = 0;
                        var item_num2 = 0;
                        var item_total1 = 0;
                        var item_total2 = 0;
                        $('#college').text(re.data[0].college_name);
                        $('#year').text('' + oldyear + '-' + year + '学年');
                        $('#class').text(re.data[0].class);
                        $('#name').text(re.data[0].s_name);
                        $('#sno').text(re.data[0].s_id);
                        localStorage.setItem("sno", re.data[0].s_id);
                        var html = localStorage.getItem("html");
                        $('#table').html(html);
                        $('#self_writing').html(re.data[0].s_name);
                        var teacher = localStorage.getItem("teacher");
                        $('#teacher_writing').html(teacher);
                        for (var i = 0; i < re.data.length; i++) {
                            if (re.data[i].type == '社会职务') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    SHZW_Data1[SHZW_num1] = dataItem;
                                    SHZW_num1++;
                                } else if (re.data[i].term == '2') {
                                    SHZW_Data2[SHZW_num2] = dataItem;
                                    SHZW_num2++;
                                }
                            } else if (re.data[i].type == '德育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    DY_Data1[DY_num1] = dataItem;
                                    DY_num1++;
                                } else if (re.data[i].term == '2') {
                                    DY_Data2[DY_num2] = dataItem;
                                    DY_num2++;
                                }
                            } else if (re.data[i].type == '美育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    MY_Data1[MY_num1] = dataItem;
                                    MY_num1++;
                                } else if (re.data[i].term == '2') {
                                    MY_Data2[MY_num2] = dataItem;
                                    MY_num2++;
                                }
                            } else if (re.data[i].type == '智育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    ZY_Data1[ZY_num1] = dataItem;
                                    ZY_num1++;
                                } else if (re.data[i].term == '2') {
                                    ZY_Data2[ZY_num2] = dataItem;
                                    ZY_num2++;
                                }
                            } else if (re.data[i].type == '体育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    TY_Data1[TY_num1] = dataItem;
                                    TY_num1++;
                                } else if (re.data[i].term == '2') {
                                    TY_Data2[TY_num2] = dataItem;
                                    TY_num2++;
                                }
                            } else if (re.data[i].type == '劳育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    LY_Data1[LY_num1] = dataItem;
                                    LY_num1++;
                                } else if (re.data[i].term == '2') {
                                    LY_Data2[LY_num2] = dataItem;
                                    LY_num2++;
                                }
                            } else if (re.data[i].type == '扣分项目') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    KF_Data1[KF_num1] = dataItem;
                                    KF_num1++;
                                } else if (re.data[i].term == '2') {
                                    KF_Data2[KF_num2] = dataItem;
                                    KF_num2++;
                                }
                            }
                        }
                        //加载社会职务
                        SHZW_html = '';
                        for (var i = 0; i < SHZW_num1; i++) {
                            if (i < 3) {
                                $('.SHZW_name1').eq(i).html(
                                    SHZW_Data1[i].item_name);
                                $('.SHZW_score1').eq(i).html(
                                    SHZW_Data1[i].score);
                                $('.SHZW_material1').eq(i).html(
                                    '<a class="material" >' +
                                    SHZW_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    SHZW_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                SHZW_more_num1++;
                                SHZW_html += '<tr><td class = "SHZW_name1" >' +
                                    SHZW_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = "SHZW_score1" > ' +
                                    SHZW_Data1[
                                        i].score +
                                    '</td> <td class = "SHZW_material1" ><a class="material" >' +
                                    SHZW_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    SHZW_Data1[i].proof +
                                    '</span></a> </td><td class = "SHZW_name2" > </td> <td class = "SHZW_score2" > </td> <td class = "SHZW_material2" > </td> </tr>';
                            }
                            SHZW_total1 += SHZW_Data1[i].score;
                        }
                        for (var i = 0; i < SHZW_num2; i++) {
                            if (i < 3) {
                                $('.SHZW_name2').eq(i).html(
                                    SHZW_Data2[i].item_name);
                                $('.SHZW_score2').eq(i).html(
                                    SHZW_Data2[i].score);
                                $('.SHZW_material2').eq(i).html(
                                    '<a class="material" >' +
                                    SHZW_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    SHZW_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                SHZW_more_num2++;
                                SHZW_html +=
                                    '<tr><td class = "SHZW_name1" ></td> <td class = "SHZW_score1" ></td> <td class = "SHZW_material1" > </td><td class = "SHZW_name2" > ' +
                                    SHZW_Data2[i]
                                    .item_name +
                                    '</td> <td class = "SHZW_score2" > ' +
                                    SHZW_Data2[i].score +
                                    '</td> <td class = "SHZW_material2" ><a class="material" >' +
                                    SHZW_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    SHZW_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            SHZW_total2 += SHZW_Data2[i].score;
                        }
                        if (SHZW_html != '') {
                            var SHZW_more_num = SHZW_more_num1 > SHZW_more_num2 ?
                                SHZW_more_num1 : SHZW_more_num2;
                            $('#SHZW').attr('rowspan', 4 + SHZW_more_num);
                            $(".SHZW_tr").eq(-1).after(SHZW_html);
                        }
                        $('#SHZW_total1').html(SHZW_total1);
                        $('#SHZW_total2').html(SHZW_total2);
                        //加载德育活动
                        DY_html = '';
                        for (var i = 0; i < DY_num1; i++) {
                            if (i < 3) {
                                $('.DY_name1').eq(i).html(
                                    DY_Data1[i].item_name);
                                $('.DY_score1').eq(i).html(
                                    DY_Data1[i].score);
                                $('.DY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    DY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    DY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                DY_more_num1++;
                                DY_html += '<tr><td class = "DY_name1" >' +
                                    DY_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = "DY_score1" > ' +
                                    DY_Data1[
                                        i].score +
                                    '</td> <td class = "DY_material1" ><a class="material" >' +
                                    DY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    DY_Data1[i].proof +
                                    '</span></a> </td><td class = "DY_name2" > </td> <td class = "DY_score2" > </td> <td class = "DY_material2" > </td> </tr>';
                            }
                            DY_total1 += DY_Data1[i].score;
                        }
                        for (var i = 0; i < DY_num2; i++) {
                            if (i < 3) {
                                $('.DY_name2').eq(i).html(
                                    DY_Data2[i].item_name);
                                $('.DY_score2').eq(i).html(
                                    DY_Data2[i].score);
                                $('.DY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    DY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    DY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                DY_more_num2++;
                                DY_html +=
                                    '<tr><td class = "DY_name1" ></td> <td class = "DY_score1" ></td> <td class = "DY_material1" > </td><td class = "DY_name2" > ' +
                                    DY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "DY_score2" > ' +
                                    DY_Data2[i].score +
                                    '</td> <td class = "DY_material2" ><a class="material" >' +
                                    DY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    DY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            DY_total2 += DY_Data2[i].score;
                        }
                        if (DY_html != '') {
                            var DY_more_num = DY_more_num1 > DY_more_num2 ?
                                DY_more_num1 : DY_more_num2;
                            $('#DY').attr('rowspan', 4 + DY_more_num);
                            $(".DY_tr").eq(-1).after(DY_html);
                        }
                        $('#DY_total1').html(DY_total1);
                        $('#DY_total2').html(DY_total2);

                        //加载智育活动
                        ZY_html = '';
                        for (var i = 0; i < ZY_num1; i++) {
                            if (i < 3) {
                                $('.ZY_name1').eq(i).text(
                                    ZY_Data1[i].item_name);
                                $('.ZY_score1').eq(i).text(
                                    ZY_Data1[i].score);
                                $('.ZY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    ZY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    ZY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                ZY_more_num1++;
                                ZY_html += '<tr><td class = "ZY_name1" >' +
                                    ZY_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = "ZY_score1" > ' +
                                    ZY_Data1[
                                        i].score +
                                    '</td> <td class = "ZY_material1" > <a class="material" >' +
                                    ZY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    ZY_Data1[i].proof +
                                    '</span></a> </td><td class = "ZY_name2" > </td> <td class = "ZY_score2" > </td> <td class = "ZY_material2" > </td> </tr>';
                            }
                            ZY_total1 += ZY_Data1[i].score;
                        }
                        for (var i = 0; i < ZY_num2; i++) {
                            if (i < 3) {
                                $('.ZY_name2').eq(i).text(
                                    ZY_Data2[i].item_name);
                                $('.ZY_score2').eq(i).text(
                                    ZY_Data2[i].score);
                                $('.ZY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    ZY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    ZY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                ZY_more_num2++;
                                ZY_html +=
                                    '<tr><td class = "ZY_name1" >< /td> <td class = "ZY_score1" ></td> <td class = "ZY_material1" > </td><td class = "ZY_name2" > ' +
                                    ZY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "ZY_score2" > ' +
                                    ZY_Data2[i].score +
                                    '</td> <td class = "ZY_material2" > <a class="material" >' +
                                    ZY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    ZY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            ZY_total2 += ZY_Data2[i].score;
                        }
                        if (ZY_html != '') {
                            var ZY_more_num = ZY_more_num1 > ZY_more_num2 ?
                                ZY_more_num1 : ZY_more_num2;
                            $('#ZY').attr('rowspan', 4 + ZY_more_num);
                            $(".ZY_tr").eq(-1).after(ZY_html);
                        }
                        $('#ZY_total1').html(ZY_total1);
                        $('#ZY_total2').html(ZY_total2);

                        //加载体育活动
                        TY_html = '';
                        for (var i = 0; i < TY_num1; i++) {
                            if (i < 3) {
                                $('.TY_name1').eq(i).text(
                                    TY_Data1[i].item_name);
                                $('.TY_score1').eq(i).text(
                                    TY_Data1[i].score);
                                $('.TY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    TY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    TY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                TY_more_num1++;
                                TY_html +=
                                    '<tr class="TY_tr"><td class = "TY_name1" >' +
                                    TY_Data1[
                                        i]
                                    .item_name +
                                    '</td> <td class = "TY_score1" > ' +
                                    TY_Data1[
                                        i].score +
                                    '</td> <td class = "TY_material1" > <a class="material" >' +
                                    TY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    TY_Data1[i].proof +
                                    '</span></a></td><td class = "TY_name2" > </td> <td class = "TY_score2" > </td> <td class = "TY_material2" > </td> </tr>';
                            }
                            TY_total1 += TY_Data1[i].score;
                        }
                        for (var i = 0; i < TY_num2; i++) {
                            if (i < 3) {
                                $('.TY_name2').eq(i).text(
                                    TY_Data2[i].item_name);
                                $('.TY_score2').eq(i).text(
                                    TY_Data2[i].score);
                                $('.TY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    TY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    TY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                TY_more_num2++;
                                TY_html +=
                                    '<tr class="TY_tr"><td class = "TY_name1"></td> <td class = "TY_score1" ></td> <td class = "TY_material1" > </td><td class = "TY_name2" > ' +
                                    TY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "TY_score2" > ' +
                                    TY_Data2[i].score +
                                    '</td> <td class = "TY_material2" ><a class="material" >' +
                                    TY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    TY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            TY_total2 += TY_Data2[i].score;
                        }
                        if (TY_html != '') {
                            var TY_more_num = TY_more_num1 > TY_more_num2 ?
                                TY_more_num1 : TY_more_num2;
                            $('#TY').attr('rowspan', 4 + TY_more_num);
                            $(".TY_tr").eq(-1).after(TY_html);
                        }
                        $('#TY_total1').html(TY_total1);
                        $('#TY_total2').html(TY_total2);

                        //加载美育活动
                        MY_html = '';
                        for (var i = 0; i < MY_num1; i++) {
                            if (i < 3) {
                                $('.MY_name1').eq(i).text(
                                    MY_Data1[i].item_name);
                                $('.MY_score1').eq(i).text(
                                    MY_Data1[i].score);
                                $('.MY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    MY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    MY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                MY_more_num1++;
                                MY_html +=
                                    '<tr class="MY_tr"><td class = ".MY_name1" >' +
                                    MY_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = ".MY_score1" > ' +
                                    MY_Data1[
                                        i].score +
                                    '</td> <td class = "MY_material1" ><a class="material" >' +
                                    MY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    MY_Data1[i].proof +
                                    '</span></a></td><td class = "MY_name2" ></td> <td class = "MY_score2" > </td> <td class = "MY_material2" > </td> </tr>';
                            }
                            MY_total1 += MY_Data1[i].score;
                        }
                        for (var i = 0; i < MY_num2; i++) {
                            if (i < 3) {
                                $('.MY_name2').eq(i).text(
                                    MY_Data2[i].item_name);
                                $('.MY_score2').eq(i).text(
                                    MY_Data2[i].score);
                                $('.MY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    MY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    MY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                MY_more_num2++;
                                MY_html +=
                                    '<tr class="MY_tr"><td class = "MY_name1"></td><td class = "MY_score1" ></td> <td class = "MY_material1" ></td><td class = "MY_name2" > ' +
                                    MY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "MY_score2" > ' +
                                    MY_Data2[i].score +
                                    '</td> <td class = "MY_material2" ><a class="material" >' +
                                    MY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    MY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            MY_total2 += MY_Data2[i].score;
                        }
                        if (MY_html != '') {
                            var MY_more_num = MY_more_num1 > MY_more_num2 ?
                                MY_more_num1 : MY_more_num2;
                            $('#MY').attr('rowspan', 4 + MY_more_num);
                            $(".MY_tr").eq(-1).after(MY_html);
                        }
                        $('#MY_total1').html(MY_total1);
                        $('#MY_total2').html(MY_total2);

                        //加载劳育活动
                        LY_html = '';
                        for (var i = 0; i < LY_num1; i++) {
                            if (i < 3) {
                                $('.LY_name1').eq(i).text(
                                    LY_Data1[i].item_name);
                                $('.LY_score1').eq(i).text(
                                    LY_Data1[i].score);
                                $('.LY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    LY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    LY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                LY_more_num1++;
                                LY_html +=
                                    '<tr class="LY_tr"><td class = ".LY_name1" >' +
                                    LY_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = ".LY_score1" > ' +
                                    LY_Data1[
                                        i].score +
                                    '</td> <td class = "LY_material1" ><a class="material" >' +
                                    LY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    LY_Data1[i].proof +
                                    '</span></a></td><td class = "LY_name2" ></td> <td class = "LY_score2" > </td> <td class = "LY_material2" > </td> </tr>';
                            }
                            KY_total1 += LY_Data1[i].score;
                        }
                        for (var i = 0; i < LY_num2; i++) {
                            if (i < 3) {
                                $('.LY_name2').eq(i).text(
                                    LY_Data2[i].item_name);
                                $('.LY_score2').eq(i).text(
                                    LY_Data2[i].score);
                                $('.LY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    LY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    LY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                LY_more_num2++;
                                LY_html +=
                                    '<tr class="LY_tr"><td class = "LY_name1"></td><td class = "LY_score1" ></td> <td class = "LY_material1" ></td><td class = "LY_name2" > ' +
                                    LY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "LY_score2" > ' +
                                    LY_Data2[i].score +
                                    '</td> <td class = "LY_material2" ><a class="material" >' +
                                    LY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    LY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            LY_total2 += LY_Data2[i].score;
                        }
                        if (LY_html != '') {
                            var LY_more_num = LY_more_num1 > LY_more_num2 ?
                                LY_more_num1 : LY_more_num2;
                            $('#LY').attr('rowspan', 4 + LY_more_num);
                            $(".LY_tr").eq(-1).after(LY_html);
                        }
                        $('#LY_total1').html(LY_total1);
                        $('#LY_total2').html(LY_total2);

                        //加载扣分项目
                        KF_html = '';
                        for (var i = 0; i < KF_num1; i++) {
                            if (i < 3) {
                                $('.KF_name1').eq(i).text(
                                    KF_Data1[i].item_name);
                                $('.KF_score1').eq(i).text(
                                    KF_Data1[i].score);
                                $('.KF_material1').eq(i).html(
                                    '<a class="material" >' +
                                    KF_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    KF_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                KF_more_num1++;
                                KF_html +=
                                    '<tr class="KF_tr"><td class = ".KF_name1" >' +
                                    KF_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = ".KF_score1" > ' +
                                    KF_Data1[
                                        i].score +
                                    '</td> <td class = "KF_material1" ><a class="material" >' +
                                    KF_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    KF_Data1[i].proof +
                                    '</span></a></td><td class = "KF_name2" ></td> <td class = "KF_score2" > </td> <td class = "KF_material2" > </td> </tr>';
                            }
                            KF_total1 += KF_Data1[i].score;
                        }
                        for (var i = 0; i < KF_num2; i++) {
                            if (i < 3) {
                                $('.KF_name2').eq(i).text(
                                    KF_Data2[i].item_name);
                                $('.KF_score2').eq(i).text(
                                    KF_Data2[i].score);
                                $('.KF_material2').eq(i).html(
                                    '<a class="material" >' +
                                    KF_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    KF_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                KF_more_num2++;
                                KF_html +=
                                    '<tr class="KF_tr"><td class = "KF_name1"></td><td class = "KF_score1" ></td> <td class = "MY_material1" ></td><td class = "MY_name2" > ' +
                                    KF_Data2[i]
                                    .item_name +
                                    '</td> <td class = "KF_score2" > ' +
                                    KF_Data2[i].score +
                                    '</td> <td class = "KF_material2" ><a class="material" >' +
                                    KF_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    KF_Data2[i].proof +
                                    '</span></a> </td> </tr>';
                            }
                            KF_total2 += KF_Data2[i].score;
                        }
                        if (KF_html != '') {
                            var KF_more_num = KF_more_num1 > KF_more_num2 ?
                                KF_more_num1 : KF_more_num2;
                            $('#KF').attr('rowspan', 4 + KF_more_num);
                            $(".KF_tr").eq(-1).after(KF_html);
                        }
                        $('#KF_total1').html(KF_total1);
                        $('#KF_total2').html(KF_total2);

                        localStorage.setItem("SHZW_Data1", JSON.stringify(
                            SHZW_Data1));
                        localStorage.setItem("SHZW_Data2", JSON.stringify(
                            SHZW_Data2));
                        localStorage.setItem("DY_Data1", JSON.stringify(
                            DY_Data1));
                        localStorage.setItem("DY_Data2", JSON.stringify(
                            DY_Data2));
                        localStorage.setItem("ZY_Data1", JSON.stringify(
                            ZY_Data1));
                        localStorage.setItem("ZY_Data2", JSON.stringify(
                            ZY_Data2));
                        localStorage.setItem("TY_Data1", JSON.stringify(
                            TY_Data1));
                        localStorage.setItem("TY_Data2", JSON.stringify(
                            TY_Data2));
                        localStorage.setItem("MY_Data1", JSON.stringify(
                            MY_Data1));
                        localStorage.setItem("MY_Data2", JSON.stringify(
                            MY_Data2));
                        localStorage.setItem("LY_Data1", JSON.stringify(
                            LY_Data1));
                        localStorage.setItem("LY_Data2", JSON.stringify(
                            LY_Data2));
                        localStorage.setItem("KF_Data1", JSON.stringify(
                            KF_Data1));
                        localStorage.setItem("KF_Data2", JSON.stringify(
                            KF_Data2));
                        var T1 = SHZW_total1 +
                            SHZW_total2; //T1为社会职务加分，上限为25分
                        if (T1 >= 25)
                            T1 = 25;
                        var T2 = DY_total1 + DY_total2; //T2为德育加分，上限为30分
                        if (T2 >= 30)
                            T2 = 30;
                        var T3 = ZY_total1 + ZY_total2; //T3为智育(创新)加分，无上限
                        var T4_T5 = TY_total1 + TY_total2 + MY_total1 +
                            MY_total2; //T4为体育加分，T5为美育加分，T4 与T5总和的上限为50分
                        if (T4_T5 >= 50)
                            T4_T5 = 50;
                        var T6 = LY_total1 +
                            LY_total2; //T6为劳育加分，该项为附加分，上限为5分
                        if (T6 >= 5)
                            T6 = 5;
                        var T7 = Math.abs(KF_total1) + Math.abs(
                            KF_total2); //T7为扣分内容
                        var total = T1 + T2 + T3 + T4_T5 + T6 - T7;
                        if (total >= 100)
                            total = 100; //量化上限100
                        $('#total').html(total);
                        window.scroll(0, 0);
                    } else {
                        if (mode == "pre")
                            layer.msg("已翻到第一页！");
                        else
                            layer.msg("已翻到最后一页！");
                    }
                })
            });
            $(function () {
                var html = $('#table').html();
                var re = new RegExp("\n                ", "g");
                html = html.replace(re, "");
                html = html.replace("<tbody>", "");
                html = html.replace("</tbody>", "");
                var re2 = new RegExp("    ", "g");
                html = html.replace(re2, "");
                html = html.replace("\n", "");
                localStorage.setItem('html', html);
                if (window.outerWidth == 836)
                    document.getElementById("searchbar").style.margin = "50px 20%";
                else {
                    document.getElementById("searchbar").style.margin = "50px 32%";
                }
                localStorage.setItem("status", status);
                $.get('/form', {
                    status: 7, //加载量化表
                    mode: "commitee"
                }, function (re) {
                    if (re != '0') {
                        var status = parseInt(re.data[0].status);
                        var year = new Date().getFullYear();
                        var oldyear = parseInt(year) - 1;
                        var name = localStorage.getItem("name");
                        var teacher = re.data[0].ct_name;
                        $('#college').text(re.data[0].college_name);
                        $('#year').text('' + oldyear + '-' + year + '学年');
                        $('#class').text(re.data[0].class);
                        $('#name').text(re.data[0].s_name);
                        $('#sno').text(re.data[0].s_id);
                        localStorage.setItem("sno", re.data[0].s_id);
                        localStorage.setItem("teacher", teacher);
                        localStorage.setItem(re.data[0].s_id + "_status", status);
                        $('#self_writing').html(re.data[0].s_name);
                        $('#teacher_writing').html(teacher);
                        for (var i = 0; i < re.data.length; i++) {
                            if (re.data[i].type == '社会职务') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    SHZW_Data1[SHZW_num1] = dataItem;
                                    SHZW_num1++;
                                } else if (re.data[i].term == '2') {
                                    SHZW_Data2[SHZW_num2] = dataItem;
                                    SHZW_num2++;
                                }
                            } else if (re.data[i].type == '德育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    DY_Data1[DY_num1] = dataItem;
                                    DY_num1++;
                                } else if (re.data[i].term == '2') {
                                    DY_Data2[DY_num2] = dataItem;
                                    DY_num2++;
                                }
                            } else if (re.data[i].type == '美育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    MY_Data1[MY_num1] = dataItem;
                                    MY_num1++;
                                } else if (re.data[i].term == '2') {
                                    MY_Data2[MY_num2] = dataItem;
                                    MY_num2++;
                                }
                            } else if (re.data[i].type == '智育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    ZY_Data1[ZY_num1] = dataItem;
                                    ZY_num1++;
                                } else if (re.data[i].term == '2') {
                                    ZY_Data2[ZY_num2] = dataItem;
                                    ZY_num2++;
                                }
                            } else if (re.data[i].type == '体育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    TY_Data1[TY_num1] = dataItem;
                                    TY_num1++;
                                } else if (re.data[i].term == '2') {
                                    TY_Data2[TY_num2] = dataItem;
                                    TY_num2++;
                                }
                            } else if (re.data[i].type == '劳育') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    LY_Data1[LY_num1] = dataItem;
                                    LY_num1++;
                                } else if (re.data[i].term == '2') {
                                    LY_Data2[LY_num2] = dataItem;
                                    LY_num2++;
                                }
                            } else if (re.data[i].type == '扣分项目') {
                                var dataItem = {
                                    item_name: '',
                                    score: '',
                                    proof: '',
                                    key: ''
                                };
                                dataItem.item_name = re.data[i].item_name;
                                dataItem.score = re.data[i].score;
                                if (re.data[i].proof != "") {
                                    dataItem.key = re.data[i].proof;
                                    dataItem.proof = localStorage.getItem(dataItem
                                        .key);
                                    dataItem.key = dataItem.key.split('_')[1];
                                }
                                if (re.data[i].term == '1') {
                                    KF_Data1[KF_num1] = dataItem;
                                    KF_num1++;
                                } else if (re.data[i].term == '2') {
                                    KF_Data2[KF_num2] = dataItem;
                                    KF_num2++;
                                }
                            }
                        }
                        //加载社会职务
                        SHZW_html = '';
                        for (var i = 0; i < SHZW_num1; i++) {
                            if (i < 3) {
                                $('.SHZW_name1').eq(i).html(
                                    SHZW_Data1[i].item_name);
                                $('.SHZW_score1').eq(i).html(
                                    SHZW_Data1[i].score);
                                $('.SHZW_material1').eq(i).html(
                                    '<a class="material" >' +
                                    SHZW_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    SHZW_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                SHZW_more_num1++;
                                SHZW_html += '<tr><td class = "SHZW_name1" >' +
                                    SHZW_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = "SHZW_score1" > ' +
                                    SHZW_Data1[
                                        i].score +
                                    '</td> <td class = "SHZW_material1" ><a class="material" >' +
                                    SHZW_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    SHZW_Data1[i].proof +
                                    '</span></a> </td><td class = "SHZW_name2" > </td> <td class = "SHZW_score2" > </td> <td class = "SHZW_material2" > </td> </tr>';
                            }
                            SHZW_total1 += SHZW_Data1[i].score;
                        }
                        for (var i = 0; i < SHZW_num2; i++) {
                            if (i < 3) {
                                $('.SHZW_name2').eq(i).html(
                                    SHZW_Data2[i].item_name);
                                $('.SHZW_score2').eq(i).html(
                                    SHZW_Data2[i].score);
                                $('.SHZW_material2').eq(i).html(
                                    '<a class="material" >' +
                                    SHZW_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    SHZW_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                SHZW_more_num2++;
                                SHZW_html +=
                                    '<tr><td class = "SHZW_name1" ></td> <td class = "SHZW_score1" ></td> <td class = "SHZW_material1" > </td><td class = "SHZW_name2" > ' +
                                    SHZW_Data2[i]
                                    .item_name +
                                    '</td> <td class = "SHZW_score2" > ' +
                                    SHZW_Data2[i].score +
                                    '</td> <td class = "SHZW_material2" ><a class="material" >' +
                                    SHZW_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    SHZW_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            SHZW_total2 += SHZW_Data2[i].score;
                        }
                        if (SHZW_html != '') {
                            var SHZW_more_num = SHZW_more_num1 > SHZW_more_num2 ?
                                SHZW_more_num1 : SHZW_more_num2;
                            $('#SHZW').attr('rowspan', 4 + SHZW_more_num);
                            $(".SHZW_tr").eq(-1).after(SHZW_html);
                        }
                        $('#SHZW_total1').html(SHZW_total1);
                        $('#SHZW_total2').html(SHZW_total2);
                        //加载德育活动
                        DY_html = '';
                        for (var i = 0; i < DY_num1; i++) {
                            if (i < 3) {
                                $('.DY_name1').eq(i).html(
                                    DY_Data1[i].item_name);
                                $('.DY_score1').eq(i).html(
                                    DY_Data1[i].score);
                                $('.DY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    DY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    DY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                DY_more_num1++;
                                DY_html += '<tr><td class = "DY_name1" >' +
                                    DY_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = "DY_score1" > ' +
                                    DY_Data1[
                                        i].score +
                                    '</td> <td class = "DY_material1" ><a class="material" >' +
                                    DY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    DY_Data1[i].proof +
                                    '</span></a> </td><td class = "DY_name2" > </td> <td class = "DY_score2" > </td> <td class = "DY_material2" > </td> </tr>';
                            }
                            DY_total1 += DY_Data1[i].score;
                        }
                        for (var i = 0; i < DY_num2; i++) {
                            if (i < 3) {
                                $('.DY_name2').eq(i).html(
                                    DY_Data2[i].item_name);
                                $('.DY_score2').eq(i).html(
                                    DY_Data2[i].score);
                                $('.DY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    DY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    DY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                DY_more_num2++;
                                DY_html +=
                                    '<tr><td class = "DY_name1" ></td> <td class = "DY_score1" ></td> <td class = "DY_material1" > </td><td class = "DY_name2" > ' +
                                    DY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "DY_score2" > ' +
                                    DY_Data2[i].score +
                                    '</td> <td class = "DY_material2" ><a class="material" >' +
                                    DY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    DY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            DY_total2 += DY_Data2[i].score;
                        }
                        if (DY_html != '') {
                            var DY_more_num = DY_more_num1 > DY_more_num2 ?
                                DY_more_num1 : DY_more_num2;
                            $('#DY').attr('rowspan', 4 + DY_more_num);
                            $(".DY_tr").eq(-1).after(DY_html);
                        }
                        $('#DY_total1').html(DY_total1);
                        $('#DY_total2').html(DY_total2);

                        //加载智育活动
                        ZY_html = '';
                        for (var i = 0; i < ZY_num1; i++) {
                            if (i < 3) {
                                $('.ZY_name1').eq(i).text(
                                    ZY_Data1[i].item_name);
                                $('.ZY_score1').eq(i).text(
                                    ZY_Data1[i].score);
                                $('.ZY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    ZY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    ZY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                ZY_more_num1++;
                                ZY_html += '<tr><td class = "ZY_name1" >' +
                                    ZY_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = "ZY_score1" > ' +
                                    ZY_Data1[
                                        i].score +
                                    '</td> <td class = "ZY_material1" > <a class="material" >' +
                                    ZY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    ZY_Data1[i].proof +
                                    '</span></a> </td><td class = "ZY_name2" > </td> <td class = "ZY_score2" > </td> <td class = "ZY_material2" > </td> </tr>';
                            }
                            ZY_total1 += ZY_Data1[i].score;
                        }
                        for (var i = 0; i < ZY_num2; i++) {
                            if (i < 3) {
                                $('.ZY_name2').eq(i).text(
                                    ZY_Data2[i].item_name);
                                $('.ZY_score2').eq(i).text(
                                    ZY_Data2[i].score);
                                $('.ZY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    ZY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    ZY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                ZY_more_num2++;
                                ZY_html +=
                                    '<tr><td class = "ZY_name1" >< /td> <td class = "ZY_score1" ></td> <td class = "ZY_material1" > </td><td class = "ZY_name2" > ' +
                                    ZY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "ZY_score2" > ' +
                                    ZY_Data2[i].score +
                                    '</td> <td class = "ZY_material2" > <a class="material" >' +
                                    ZY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    ZY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            ZY_total2 += ZY_Data2[i].score;
                        }
                        if (ZY_html != '') {
                            var ZY_more_num = ZY_more_num1 > ZY_more_num2 ?
                                ZY_more_num1 : ZY_more_num2;
                            $('#ZY').attr('rowspan', 4 + ZY_more_num);
                            $(".ZY_tr").eq(-1).after(ZY_html);
                        }
                        $('#ZY_total1').html(ZY_total1);
                        $('#ZY_total2').html(ZY_total2);

                        //加载体育活动
                        TY_html = '';
                        for (var i = 0; i < TY_num1; i++) {
                            if (i < 3) {
                                $('.TY_name1').eq(i).text(
                                    TY_Data1[i].item_name);
                                $('.TY_score1').eq(i).text(
                                    TY_Data1[i].score);
                                $('.TY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    TY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    TY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                TY_more_num1++;
                                TY_html +=
                                    '<tr class="TY_tr"><td class = "TY_name1" >' +
                                    TY_Data1[
                                        i]
                                    .item_name +
                                    '</td> <td class = "TY_score1" > ' +
                                    TY_Data1[
                                        i].score +
                                    '</td> <td class = "TY_material1" > <a class="material" >' +
                                    TY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    TY_Data1[i].proof +
                                    '</span></a></td><td class = "TY_name2" > </td> <td class = "TY_score2" > </td> <td class = "TY_material2" > </td> </tr>';
                            }
                            TY_total1 += TY_Data1[i].score;
                        }
                        for (var i = 0; i < TY_num2; i++) {
                            if (i < 3) {
                                $('.TY_name2').eq(i).text(
                                    TY_Data2[i].item_name);
                                $('.TY_score2').eq(i).text(
                                    TY_Data2[i].score);
                                $('.TY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    TY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    TY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                TY_more_num2++;
                                TY_html +=
                                    '<tr class="TY_tr"><td class = "TY_name1"></td> <td class = "TY_score1" ></td> <td class = "TY_material1" > </td><td class = "TY_name2" > ' +
                                    TY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "TY_score2" > ' +
                                    TY_Data2[i].score +
                                    '</td> <td class = "TY_material2" ><a class="material" >' +
                                    TY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    TY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            TY_total2 += TY_Data2[i].score;
                        }
                        if (TY_html != '') {
                            var TY_more_num = TY_more_num1 > TY_more_num2 ?
                                TY_more_num1 : TY_more_num2;
                            $('#TY').attr('rowspan', 4 + TY_more_num);
                            $(".TY_tr").eq(-1).after(TY_html);
                        }
                        $('#TY_total1').html(TY_total1);
                        $('#TY_total2').html(TY_total2);

                        //加载美育活动
                        MY_html = '';
                        for (var i = 0; i < MY_num1; i++) {
                            if (i < 3) {
                                $('.MY_name1').eq(i).text(
                                    MY_Data1[i].item_name);
                                $('.MY_score1').eq(i).text(
                                    MY_Data1[i].score);
                                $('.MY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    MY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    MY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                MY_more_num1++;
                                MY_html +=
                                    '<tr class="MY_tr"><td class = ".MY_name1" >' +
                                    MY_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = ".MY_score1" > ' +
                                    MY_Data1[
                                        i].score +
                                    '</td> <td class = "MY_material1" ><a class="material" >' +
                                    MY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    MY_Data1[i].proof +
                                    '</span></a></td><td class = "MY_name2" ></td> <td class = "MY_score2" > </td> <td class = "MY_material2" > </td> </tr>';
                            }
                            MY_total1 += MY_Data1[i].score;
                        }
                        for (var i = 0; i < MY_num2; i++) {
                            if (i < 3) {
                                $('.MY_name2').eq(i).text(
                                    MY_Data2[i].item_name);
                                $('.MY_score2').eq(i).text(
                                    MY_Data2[i].score);
                                $('.MY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    MY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    MY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                MY_more_num2++;
                                MY_html +=
                                    '<tr class="MY_tr"><td class = "MY_name1"></td><td class = "MY_score1" ></td> <td class = "MY_material1" ></td><td class = "MY_name2" > ' +
                                    MY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "MY_score2" > ' +
                                    MY_Data2[i].score +
                                    '</td> <td class = "MY_material2" ><a class="material" >' +
                                    MY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    MY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            MY_total2 += MY_Data2[i].score;
                        }
                        if (MY_html != '') {
                            var MY_more_num = MY_more_num1 > MY_more_num2 ?
                                MY_more_num1 : MY_more_num2;
                            $('#MY').attr('rowspan', 4 + MY_more_num);
                            $(".MY_tr").eq(-1).after(MY_html);
                        }
                        $('#MY_total1').html(MY_total1);
                        $('#MY_total2').html(MY_total2);

                        //加载劳育活动
                        LY_html = '';
                        for (var i = 0; i < LY_num1; i++) {
                            if (i < 3) {
                                $('.LY_name1').eq(i).text(
                                    LY_Data1[i].item_name);
                                $('.LY_score1').eq(i).text(
                                    LY_Data1[i].score);
                                $('.LY_material1').eq(i).html(
                                    '<a class="material" >' +
                                    LY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    LY_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                LY_more_num1++;
                                LY_html +=
                                    '<tr class="LY_tr"><td class = ".LY_name1" >' +
                                    LY_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = ".LY_score1" > ' +
                                    LY_Data1[
                                        i].score +
                                    '</td> <td class = "LY_material1" ><a class="material" >' +
                                    LY_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    LY_Data1[i].proof +
                                    '</span></a></td><td class = "LY_name2" ></td> <td class = "LY_score2" > </td> <td class = "LY_material2" > </td> </tr>';
                            }
                            KY_total1 += LY_Data1[i].score;
                        }
                        for (var i = 0; i < LY_num2; i++) {
                            if (i < 3) {
                                $('.LY_name2').eq(i).text(
                                    LY_Data2[i].item_name);
                                $('.LY_score2').eq(i).text(
                                    LY_Data2[i].score);
                                $('.LY_material2').eq(i).html(
                                    '<a class="material" >' +
                                    LY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    LY_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                LY_more_num2++;
                                LY_html +=
                                    '<tr class="LY_tr"><td class = "LY_name1"></td><td class = "LY_score1" ></td> <td class = "LY_material1" ></td><td class = "LY_name2" > ' +
                                    LY_Data2[i]
                                    .item_name +
                                    '</td> <td class = "LY_score2" > ' +
                                    LY_Data2[i].score +
                                    '</td> <td class = "LY_material2" ><a class="material" >' +
                                    LY_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    LY_Data2[i].proof +
                                    '</span></a></td> </tr>';
                            }
                            LY_total2 += LY_Data2[i].score;
                        }
                        if (LY_html != '') {
                            var LY_more_num = LY_more_num1 > LY_more_num2 ?
                                LY_more_num1 : LY_more_num2;
                            $('#LY').attr('rowspan', 4 + LY_more_num);
                            $(".LY_tr").eq(-1).after(LY_html);
                        }
                        $('#LY_total1').html(LY_total1);
                        $('#LY_total2').html(LY_total2);

                        //加载扣分项目
                        KF_html = '';
                        for (var i = 0; i < KF_num1; i++) {
                            if (i < 3) {
                                $('.KF_name1').eq(i).text(
                                    KF_Data1[i].item_name);
                                $('.KF_score1').eq(i).text(
                                    KF_Data1[i].score);
                                $('.KF_material1').eq(i).html(
                                    '<a class="material" >' +
                                    KF_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    KF_Data1[i].proof +
                                    '</span></a> ');
                            } else {
                                KF_more_num1++;
                                KF_html +=
                                    '<tr class="KF_tr"><td class = ".KF_name1" >' +
                                    KF_Data1[
                                        i]
                                    .item_name +
                                    ' </td> <td class = ".KF_score1" > ' +
                                    KF_Data1[
                                        i].score +
                                    '</td> <td class = "KF_material1" ><a class="material" >' +
                                    KF_Data1[i].key +
                                    ' <span class="link" style="display:none">' +
                                    KF_Data1[i].proof +
                                    '</span></a></td><td class = "KF_name2" ></td> <td class = "KF_score2" > </td> <td class = "KF_material2" > </td> </tr>';
                            }
                            KF_total1 += KF_Data1[i].score;
                        }
                        for (var i = 0; i < KF_num2; i++) {
                            if (i < 3) {
                                $('.KF_name2').eq(i).text(
                                    KF_Data2[i].item_name);
                                $('.KF_score2').eq(i).text(
                                    KF_Data2[i].score);
                                $('.KF_material2').eq(i).html(
                                    '<a class="material" >' +
                                    KF_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    KF_Data2[i].proof +
                                    '</span></a> ');
                            } else {
                                KF_more_num2++;
                                KF_html +=
                                    '<tr class="KF_tr"><td class = "KF_name1"></td><td class = "KF_score1" ></td> <td class = "MY_material1" ></td><td class = "MY_name2" > ' +
                                    KF_Data2[i]
                                    .item_name +
                                    '</td> <td class = "KF_score2" > ' +
                                    KF_Data2[i].score +
                                    '</td> <td class = "KF_material2" ><a class="material" >' +
                                    KF_Data2[i].key +
                                    ' <span class="link" style="display:none">' +
                                    KF_Data2[i].proof +
                                    '</span></a> </td> </tr>';
                            }
                            KF_total2 += KF_Data2[i].score;
                        }
                        if (KF_html != '') {
                            var KF_more_num = KF_more_num1 > KF_more_num2 ?
                                KF_more_num1 : KF_more_num2;
                            $('#KF').attr('rowspan', 4 + KF_more_num);
                            $(".KF_tr").eq(-1).after(KF_html);
                        }
                        $('#KF_total1').html(KF_total1);
                        $('#KF_total2').html(KF_total2);

                        localStorage.setItem("SHZW_Data1", JSON.stringify(
                            SHZW_Data1));
                        localStorage.setItem("SHZW_Data2", JSON.stringify(
                            SHZW_Data2));
                        localStorage.setItem("DY_Data1", JSON.stringify(
                            DY_Data1));
                        localStorage.setItem("DY_Data2", JSON.stringify(
                            DY_Data2));
                        localStorage.setItem("ZY_Data1", JSON.stringify(
                            ZY_Data1));
                        localStorage.setItem("ZY_Data2", JSON.stringify(
                            ZY_Data2));
                        localStorage.setItem("TY_Data1", JSON.stringify(
                            TY_Data1));
                        localStorage.setItem("TY_Data2", JSON.stringify(
                            TY_Data2));
                        localStorage.setItem("MY_Data1", JSON.stringify(
                            MY_Data1));
                        localStorage.setItem("MY_Data2", JSON.stringify(
                            MY_Data2));
                        localStorage.setItem("LY_Data1", JSON.stringify(
                            LY_Data1));
                        localStorage.setItem("LY_Data2", JSON.stringify(
                            LY_Data2));
                        localStorage.setItem("KF_Data1", JSON.stringify(
                            KF_Data1));
                        localStorage.setItem("KF_Data2", JSON.stringify(
                            KF_Data2));
                        var T1 = SHZW_total1 +
                            SHZW_total2; //T1为社会职务加分，上限为25分
                        if (T1 >= 25)
                            T1 = 25;
                        var T2 = DY_total1 + DY_total2; //T2为德育加分，上限为30分
                        if (T2 >= 30)
                            T2 = 30;
                        var T3 = ZY_total1 + ZY_total2; //T3为智育(创新)加分，无上限
                        var T4_T5 = TY_total1 + TY_total2 + MY_total1 +
                            MY_total2; //T4为体育加分，T5为美育加分，T4 与T5总和的上限为50分
                        if (T4_T5 >= 50)
                            T4_T5 = 50;
                        var T6 = LY_total1 +
                            LY_total2; //T6为劳育加分，该项为附加分，上限为5分
                        if (T6 >= 5)
                            T6 = 5;
                        var T7 = Math.abs(KF_total1) + Math.abs(
                            KF_total2); //T7为扣分内容
                        var total = T1 + T2 + T3 + T4_T5 + T6 - T7;
                        if (total >= 100)
                            total = 100; //量化上限100
                        $('#total').html(total);
                    } else {
                        layer.msg("暂无学生量化表！");
                        $('#haveForm').css('display', 'none');
                        $('#noForm').css('display', 'block');
                    }
                })
            })
        });
    </script>
</body>